<div><input type="button" name="btn_back" value="Back" onclick="location.href='?mod=markattempt'" /></div><br />
<div>
<form name="frm_markStuAttemp" method="POST" action="">
<table border="1" width="600" cellpadding="5" cellspacing="0" style="border-collapse:collapse">
	<tr>
    	<td width="10" align="center">Number</td>
        <td width="400" align="center">Answer, Mark, Feedback</td>
    </tr>
    {section name="qa" loop=$list_questions}
    <tr>
    	<td align="center">{$smarty.section.qa.iteration}</td>
        <td>
        	<div><label><b>Question:</b><br /> {$list_questions[qa].Question}</label><input type="hidden" name="qid[]" value="{$list_questions[qa].QuestionNo}" /><input type="hidden" name="q_model[]" value="{$list_questions[qa].ModelAnswer}" /></div><br />
            <div><b><label>Student answer:</label></b></div>
            {if $list_questions[qa].Answer eq "" || $list_questions[qa].Answer eq null}
            <div>Not answer</div>
            {else}
            	{if $list_questions[qa].ModelAnswer eq 2 || $list_questions[qa].ModelAnswer eq 3}
                	<div>{$list_questions[qa].ta_Option1}</div>
                {elseif $list_questions[qa].ModelAnswer eq 3}
                	<div>{$list_questions[qa].Answer}</div>
                {elseif $list_questions[qa].ModelAnswer eq 0}
                	<div>
                    	{if $list_questions[qa].ta_Option1}{$list_questions[qa].ta_Option1}{/if}
                        {if $list_questions[qa].ta_Option2}{$list_questions[qa].ta_Option2}{/if}
                        {if $list_questions[qa].ta_Option3}{$list_questions[qa].ta_Option3}{/if}
                        {if $list_questions[qa].ta_Option4}{$list_questions[qa].ta_Option4}{/if}
                        {if $list_questions[qa].ta_Option5}{$list_questions[qa].ta_Option5}{/if}
                    </div>    
                {elseif $list_questions[qa].ModelAnswer eq 1}
                	<div>
                    	<ul>
                        	{if $list_questions[qa].ta_Option1}<li>{$list_questions[qa].ta_Option1}</li>{/if}
                            {if $list_questions[qa].ta_Option2}<li>{$list_questions[qa].ta_Option2}</li>{/if}
                            {if $list_questions[qa].ta_Option3}<li>{$list_questions[qa].ta_Option3}</li>{/if}
                            {if $list_questions[qa].ta_Option4}<li>{$list_questions[qa].ta_Option4}</li>{/if}
                            {if $list_questions[qa].ta_Option5}<li>{$list_questions[qa].ta_Option5}</li>{/if}
                        </ul>
                    </div>
                {/if}
            {/if}
            <br />
            <div><b><label>Mark:</label>&nbsp;{$list_questions[qa].ta_Mark}</b>&nbsp;
			 <br/><b><label>New Mark:</label></b>&nbsp;<input type="text" name="mark{$smarty.section.qa.iteration}" value="{$list_questions[qa].ta_Mark}" />
			</div>
            <br />
			<b><label>Feedback:</label></b>
			<br/>
			<textarea name="feedback{$smarty.section.qa.iteration}" wrap="virtual" cols="50" rows="7">{$list_questions[qa].ta_Feedback}</textarea>
        </td>
    </tr>
    {/section}
</table>	
</div>
<br />
<div><b>Overall mark: {$overall_mark}</b></div>
<br /><br />
<input type="hidden" name="testid" value="{$testid}" />
<input type="hidden" name="attempt" value="{$attempt}" />
<input type="hidden" name="stuid" value="{$stuid}" />
<input type="hidden" name="number_questions" value="{$number_questions}" />
<input type="submit" name="btn_submit" value="Submit" />
</form>

